from datetime import datetime
from flask_login import UserMixin
from applications.extensions import db


def get_current_time():
    create_at = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    return datetime.strptime(create_at, "%Y-%m-%d %H:%M:%S")

class Reagent(db.Model, UserMixin):
    __tablename__ = 'admin_reagent'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='试剂ID')
    reagentName = db.Column(db.String(20), comment='试剂名称')
    thickness = db.Column(db.Float, comment='试剂浓度')
    volume = db.Column(db.Float, comment='试剂体积')
    producer = db.Column(db.String(50), comment='制造商')
    storage_condition = db.Column(db.String(255), comment='存储条件')
    description = db.Column(db.String(255), comment='试剂的描述')
    update_at = db.Column(db.DateTime, comment='最后更新的时间')


